home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util2
/
erp13.lha
/
ERP13.doc
< prev
Wrap
Text File
|
1995-10-01
|
8KB
|
205 lines
EasyRequestPatch V1.3 by Chris Hodges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Introduction
~~~~~~~~~~~~
A friend of mine once asked me, if I could write a little program for
his BBS that would cancel all the system-requesters that may appear,
as his harddisk brought up read/write errors which were not really
existant.
So this is my first attempt for such a patch. I thought somebody had
already invented a program like this, but none of the asked sysops
could help.
The patch will kill any requester that matches a pattern given in a
config file. Other requesters will not be harmed at all.
I tried to make this program as secure and efficient as possible, and
I think this program is.
Requirements
~~~~~~~~~~~~
EasyRequestPatch needs Kick 2.04 or higher and about 14 KB of memory.
Usage
~~~~~
Run >NIL: ERP >>logfile [configfile] [QUIT]
As you can see, the program does not unhook itself. The config file
must be specified if you install the patch, to remove the patch
again, ERP QUIT is sufficient. All normal cli output can be
redirected into a log file.
Configuration
~~~~~~~~~~~~~
An example configuration file has been included in the archive.
The configuration file is a normal AmigaDOS ascii-text. It may *NOT*
contain other line seperators than linefeeds (no CRs allowed!).
Empty lines and characters after a semicolon are ignored.
A configuration line looks like this:
pattern,(delay,gadgetnum,retries)
or
pattern,(delay,gadgetnum,retries),(delay,gadgetnum,retries),... etc.
The pattern string may contain any normal dos jokers. Use quotemarks
where required. After the pattern you have to enter at least one
group containing three defining values. You can define up to five
such groups. delay is used to specify the time to pass before ERP
answers the requester with the given gadget number. These delays
have to be entered in units of 1/50 secs.
This action will be repeated until the requester shuts up or the
number of retries has been overridden. If this happens, the next
group will be taken for the requester, or if it already has been the
last group, the requester will pop up as usually.
The gadgets in each requester are placed in ascending order from 1 to
N-1, whereas N represents the total amount of gadgets in the dialogue
box. The last gadget (often 'Cancel') is always gadget number 0.
There are few 'special' gadgetnumbers:
-1: Is used to behave as if an IDCMP event has occurred (often this
has the same result as clicking on the 'Retry' gadget.
-2: Just waits the amount of time you give with the delay
instruction.
-3: Flashes the display and beeps.
-4: Resets the computer after the given delay. Please note that this
delay should be at least 5 seconds (=250 VBLs), to ensure that
all disk activity has been stopped.
-5: Like -4, but kills the exec base to avoid a guru meditation on
bootup.
Note that the patterns are proccessed in that order they have been
entered into. There can be as many pattern definitions as you like.
Notes
~~~~~
Due to the dynamic linked lists used in this program, it could happen
that this program fragmentates your memory. Therefore I use reversed
memory allocation to avoid little scattered memory blocks.
These linked lists are required to distinguish between different
requester coming from different tasks. As there is no possibility to
check whether a requester has been killed successfully (i.e the
program is satisfied with the result and does not opens the requester
again), the program reserves some memory to save some information
about the requester. If the same requester appears within ten seconds
ERP acts according to the group behaviour. Otherwise the memory is
freed and the old requester will be forgotten.
History
~~~~~~~
V1.3 (01-Oct-95):
~~~~~~~~~~~~~~~~~
- No stack problems anymore. Now uses it's own stack for the patch
routine.
V1.2 (25-Aug-95):
~~~~~~~~~~~~~~~~~
- Crashed on MC68000 due to one (!) accidentially used 68020
instructions. Fixed.
- Not enough stack will pop up the requester now.
- Added stack checking. Now it cannot crash anymore due to too few
stack. Minimum stack required for pattern matching: 1500 bytes.
- Moved the pattern token creation to the config parsing, so the
patch has become a little big faster.
- The bug with the Ctrl-C key doesn't appear anymore.
V1.1 (28-Jul-95):
~~~~~~~~~~~~~~~~~
- Since there were problems with read write errors, I've set the
maximum quantum up again to 10 seconds.
- Fixes some little bugs which caused the requester to be forgotten
too early.
- The fixes didn't help at all. Seems as if read/write errors lock
up the dos output routines, so I have added a new linked list
containing the output strings so they can be printed by the main
program. This allows me to use buffered string printing again.
Now it finally *should* run correctly.
- Those little annoying bugs... logical mistake locked the output
buffer list during output so the requester hung again. Fixed using
another little buffer. If it now doesn't run, I'll give it up.
V1.0 (26-Jul-95):
~~~~~~~~~~~~~~~~~
- The logfile was a little bit faulty due to the mixed usage of
buffered and non-buffered writing. This has been fixed now.
- Changed the main loop quantum from 1 VBL delay to 10 VBLs. This
will reduce the cpu usage.
- Changed the requester-timeout to two seconds instead of one.
- Modified the parser to check for more errors.
- Increased the general buffers a bit.
- Strange things seem to happen: The last program opening a
requester, will get the control-c signal passed through. No clue
why this happens and how to prevent it. Please use 'ERP Quit'
instead of the Ctrl-C key.
- Added the wait and reset events.
- Added the beep and hard reset events.
V1.0ß (25-Jul-95):
~~~~~~~~~~~~~~~~~~
- First release. Works quite well.
Copyright notice
~~~~~~~~~~~~~~~~
EasyRequestPatch (ERP) and it's documentation are Copyright © 1995
by Chris Hodges. All rights reserved.
Disclaimer
~~~~~~~~~~
EasyRequestPatch has proven to be stable in everyday use. The author
is not responsible for any loss of data, damages to software or
hardware that may result directly or indirectly from the use of this
program. The author reserves the right to make changes to the
software or documentation without notice.
Shareware note
~~~~~~~~~~~~~~
This program is shareware, this means that you can copy it freely as
long as you don't ask any more money for it than a nominal fee for
copying. If you want to distribute this program you must keep this
document with it. This program cannot be used for commercial purposes
without written permission from the author.
None of the files of the ERP package may be modified or left out
without permission of the author. Crunching or archiving is allowed
only if none of the ERP files get modified by it. Adding BBS adverts
or similar to such an archive is forbidden.
Moreover, it is forbidden to use ERP following conditions:
- For construction, development, creation or testing of weapons or
any other types of arms.
- Your name is Marc Stachel (better known as Charlie/KF) or
Florian Graßinger (Mirage/KF).
ERP may not be included in archives containing the mailbox program
'FastCall' or 'Prometheus' nor in archives with indirect or direct
Krypton Force productions.
If you use this program regularily, the author would appreciate any
donation you could give him. Especially SysOps could register this
program, as they really may need ERP for his BBS.
Contact address
~~~~~~~~~~~~~~~
Any mails or donations to:
Chris Hodges Account: 359 68 63
Kennedystr. 8 BLZ : 700 530 70
D-82178 Puchheim Bank : Sparkasse Fürstenfeldbruck
Germany
Tel.: 089/8005856
Email: chris@sixpack.pfalz.org